Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ENV based Open Tracing provider configuration support #3421

Closed
wants to merge 1 commit into from
Closed

fix: ENV based Open Tracing provider configuration support #3421

wants to merge 1 commit into from

Conversation

apexskier
Copy link
Contributor

@apexskier apexskier commented Jan 21, 2023

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

I've been trying to configure hydra for open telemetry with New Relic and am running into some issues.

I've identified one that this resolves. It's currently not possible to set the open telemetry server url (or any of the open telemetry tracing provider options from https://github.com/ory/x/blob/f6df4499d0545937d3de211c97116671f431d60f/otelx/config.go#L44) through environment variables because the configuration schema does not know about them (and the json schema is used to parse env vars).

Adding that config to the schema fixes the env var parsing. (However I'm still working on getting open tracing working overall for my use case)

I think this'll also update docs

I have not added tests, as I'm expecting the codebase is already exercising the env var parsing logic through the example jaeger config files, and I didn't see an equivalent for zipkin.

@CLAassistant
Copy link

CLAassistant commented Jan 21, 2023

CLA assistant check
All committers have signed the CLA.

@apexskier apexskier changed the title Fix ENV based Open Tracing provider configuration support fix: ENV based Open Tracing provider configuration support Jan 21, 2023
@apexskier
Copy link
Contributor Author

apexskier commented Jan 21, 2023

Looks like I might be the first contributor in 2023? The format task is failing since it wants me to switch everything from 2022 to 2023.

@apexskier apexskier marked this pull request as ready for review January 21, 2023 01:48
@codecov
Copy link

codecov bot commented Jan 21, 2023

Codecov Report

Merging #3421 (5e9ccaa) into master (4eb13c9) will decrease coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3421      +/-   ##
==========================================
- Coverage   76.75%   76.66%   -0.09%     
==========================================
  Files         123      123              
  Lines        9076     9029      -47     
==========================================
- Hits         6966     6922      -44     
+ Misses       1668     1666       -2     
+ Partials      442      441       -1     
Impacted Files Coverage Δ
persistence/sql/persister_oauth2.go 82.12% <0.00%> (-0.77%) ⬇️
flow/flow.go 93.18% <0.00%> (+1.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@alnr
Copy link
Contributor

alnr commented Feb 7, 2023

Hi @apexskier! Can you check if the env-based configuration works on current master? We've recently had this change #3431

@apexskier
Copy link
Contributor Author

Yeah, looks like that does. Thanks, I'll wait for the next release!

hydra – ~ go1 19 6pkgmodgithub comoryx@v0 0 534otelxotel go - GoLand - 2023-02-22 at 11 01 45@2x

@apexskier apexskier closed this Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants